<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/modules/book/front/include/taglib.jsp" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title>自助搜索-${fns:getConfig('productName')} </title>
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
    <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=9; IE=10; IE=11; IE=EDGE">
    <script type="text/javascript">
        var FINAL_COUNT = ${fns:getDictValue('search','selfCountDown' ,'200')}
    </script>
    <%@ include file="/WEB-INF/views/include/common.jsp" %>
    <%@ include file="/WEB-INF/views/include/countDown.jsp" %>
    <script src="${ctxStatic}/softkey/vk_loader.js?vk_layout=CN%20Chinese%20Simpl.%20Pinyin&vk_skin=flat_gray" type="text/javascript"></script>
    <style>
        .input-lg{ height: 66px; font-size: 22px; } .form-group { margin-bottom: 45px; } .container { padding-right: 135px; padding-left: 135px; }
        .softkey{position: absolute;}
        .softkey * {box-sizing: content-box;}
        #kb_langselector, #kb_mappingselector, #copyrights {display:none;}
    </style>
    <script>
        function keyboard(inputName, ser_id) {
            VirtualKeyboard.toggle(inputName, 'softkey_' + ser_id);
        }
        function aaaaaa(obj){
            alert($(obj).val());
        }
    </script>
</head>
<body>
<div class="page-header">
    <div class="row">
        <div class="col-md-offset-1 col-md-9">
            <h1>智能图书馆借还系统</h1>
        </div>
    </div>
</div>

<div class="container">
    <form id="searchForm" action="${cts}/bookinfo/getBookinfo" method="post" target="_self">
        <div class="form-group">
            <label class="sr-only" for="bookname">书名</label>
            <input type="text" class="form-control input-lg" id="bookname" name="bookname" autocomplete="off"
                   placeholder="输入书名" onfocus='keyboard("bookname", 1);' onblur="keyboard('author', 1);">
            <div id="softkey_1" class="softkey"></div>
        </div>
        <div class="form-group">
            <label class="sr-only" for="author">作者</label>
            <input type="text" class="form-control input-lg" id="author" name="author" autocomplete="off"
                   placeholder="输入作者" onfocus='keyboard("author", 2);' onblur="keyboard('author', 2);">
            <div id="softkey_2" class="softkey"></div>
        </div>
        <div class="form-group">
            <label class="sr-only" for="classcode">分类</label>
            <input type="text" class="form-control input-lg" id="classcode" name="classcode" autocomplete="off"
                   placeholder="输入分类" onfocus='keyboard("classcode", 3);' onblur="keyboard('classcode', 3);">
            <div id="softkey_3" class="softkey"></div>
        </div>
        <div class="form-group">
            <label class="sr-only" for="publisher">出版社</label>
            <input type="text" class="form-control input-lg" id="publisher" name="publisher" autocomplete="off"
                   placeholder="输入出版社" onfocus='keyboard("publisher", 4);' onblur="keyboard('publisher', 4);">
            <div id="softkey_4" class="softkey"></div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-4 col-sm-10">
                <input class="btn btn-primary btn-lg" type="button" value="图书查询" onclick="submitForm()"/>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript">
    function submitForm(){
        var bookname = $("#bookname").val();
        var classcode = $("#classcode").val();
        var author = $("#author").val();
        var publisher = $("#publisher").val();
        if (bookname === '' && classcode === '' && author === '' && publisher === '') {
            layer.msg("至少填写一项查询条件!");
        } else {
            $("#searchForm").submit();
        }
    }
</script>
</body>
</html>